package cn.sunagy.security.maz.auth.server.module.client.controller;

import cn.sunagy.security.maz.auth.server.module.oauth.Oauth2PasswordRequest;
import cn.sunagy.security.maz.common.constant.RequestHeaderConstants;
import cn.sunagy.security.maz.common.response.ObjectRestResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @desc：#TODO fill me ！
 * @author：三餘無夢生
 * @date：2018/5/31
 * @time：下午7:08
 */
@RestController
@RequestMapping("/customerProduct")
@Slf4j
@Deprecated
public class AuthController {
    @RequestMapping(value = "token", method = RequestMethod.POST)
    public ObjectRestResponse<String> createAuthenticationToken(
            @RequestBody Oauth2PasswordRequest oauth2PasswordRequest) throws Exception {
        log.info(oauth2PasswordRequest.getUsername());
        return new ObjectRestResponse<String>().data(RequestHeaderConstants.JWT_TOKEN_TYPE + "token");
    }
}
